<div id="deviceGrid" ></div>
<script type="text/javascript">
    $(function() {
        $("#deviceGrid").focus();
        var conditions = [
            {"column": "networkId", "value": "lizhenxing1031@163.com"}
        ];
        $("#deviceGrid").fdatagrid({
            reportId: 'getUserDetailDevice',
            condition: conditions,
            table_height: 450,
            itemClick: onSelect
        });
        function onSelect(){
            var buttonId = $("#deviceGrid").parent().data("buttonId");
            $("#"+buttonId).trigger("blur");
            if (buttonId!=undefined){
                if ($(this).find("td:eq(1)").children().length>0){
                    $("#"+buttonId).val($(this).find("td:eq(1)").children().html());
                    $("#"+buttonId).text($(this).find("td:eq(1)").children().html());
                }else{
                    $("#"+buttonId).val($(this).find("td:eq(1)").html());
                    $("#"+buttonId).text($(this).find("td:eq(1)").html());
                }
            }
            //回调点击操作
            if ($("#"+buttonId).data("selectComplete")!=undefined){
                eval($("#"+buttonId).data("selectComplete") + "(\"" +$(this).find("td:eq(1)").children().html() + "\")" );
            }
            setTimeout("$(\"#"+buttonId + "\").focus()",200);
            $("#windowClosed" +$("#deviceGrid").parent().data("winId")).click();
        }
    });
</script>